package com.yksj.healthtalk.comm;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ExpandableListView;

import com.yksj.healthtalk.adapter.CheckboxExpendListAdapter;
import com.yksj.healthtalk.ui.R;


/**
 * group多选
 * @author zhao
 *
 */
public class CheckBoxExpendlistFragment extends Fragment implements OnClickListener {
	
	CheckboxExpendListAdapter mAdapter;
	ExpandableListView mExpandableListView;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.checkbox_expendlist_layout,null);
		view.findViewById(R.id.check).setOnClickListener(this);
		mExpandableListView = (ExpandableListView)view.findViewById(R.id.expandalistview);
		return view;
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		if(mAdapter == null){
			mAdapter = new CheckboxExpendListAdapter(getLayoutInflater(savedInstanceState),getActivity());
			onInitData();
		}
		mExpandableListView.setAdapter(mAdapter);
	}
	
	private void onInitData(){
		
	}
	
	@Override
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.check:
			
			break;
			
		}
	}
}
